<template>
	<view class="container padding-top-sm position-relative">
		<view v-if='list.length!=0' class="radius10  padding margin-left-sm margin-right-sm margin-top margin-bottom bg-white">
			<view class="flex justify-between align-center margin-bottom" v-for="item in list">
				<view class="flex justify-start align-center">
					<image :src="item.extendUserIcon" mode="" class="cu-avatar round lg"></image>
					<view class="margin-left-sm">
						<view class="text-13 text-333">
							{{item.extendUserName}} (ID:{{item.userId}})
						</view>
						<view class="text-11 text-999 margin-top-xs">
							注册时间{{item.createTime}}
						</view>
					</view>
				</view>
				<view class="text-sm text-999">
					{{item.userOperatorStatus?'运营商':item.userProviderStatus?'服务商':item.userCourierStatus?'配送工':item.userMechanicStatus?'技工':'暂无'}}
				</view>
			</view>
		</view>
		<uni-load-more :status="loading" />
	</view>
</template>

<script>
	import BetterPull from '@/common/util/BetterPull'
	export default {
		mixins: [
			BetterPull({
				async getPage(page, done) {
					this.loading = 'loading';
					const obj = {
					extendUserId: uni.getStorageSync('userId'),
					pageNum: page,
					pageSize: 10,
					}

					const [err, res] = await this.$get(this.$api.recomList, obj)
					if (res) {
						var data = res.data.list
						done(data);
						if (data.length < 10) {
							this.loading = 'noMore';
						} else {
							this.loading = 'more';
						}

					}
					if (err) {
						done([]);
						this.loading = 'noMore';
					}
				}
			})
		],
		data() {
			return {
				loading: "more"
			}
		},
		onLoad() {

		},
		methods: {
			
		}
	}
</script>

<style>

</style>
